/****************************************************
           File Name:golf.cpp
          Author: Abby Cin
          Mail: abbytsing@gmail.com
          Created Time: Sun 21 Dec 2014 02:29:59 PM CST
*****************************************************/

#include"golf.h"
#include<iostream>

// non-interactive ver:
void setgolf(golf & g, const char *name, int hc)
{
    for(int i = 0; name[i] != '\0'; i++)
        g.fullname[i] = name[i];
    g.handicap = hc;
}
// interactive ver:
void setgolf(golf & g)
{
    std::cout << "Enter name: " ;
    std::cin.getline(g.fullname, Len);
    std::cout << "Enter handicap: ";
    std::cin >> g.handicap;
}

void handicap(golf & g, int n)
{
    g.handicap = n;
}

void showgolf(const golf & g)
{
    std::cout << g.fullname << std::endl;
    std::cout << g.handicap << std::endl;
}
